|
|
 |
|
|
|
|
5:
6: Private Sub picDisplay_OLEDragDrop(Data As DataObject, Effect As Long,_
7: Button As Integer, Shift As _
8: Integer, X As Single, Y As Single)
9: frmAddressEntry.sqlEntry = select * from [Address Entry] Where_
10: [AddressID] = & _
11: Mid(tvTreeView.SelectedItem.Key, 1, 3)
12: frmAddressEntry.Show
13: End Sub |
|
|
|
|
|
|
|
|
Place this code into your address book main form and try the new functions that you have just added. |
|
|
|
|
|
|
|
|
Note The preceding code assumes that you have modified the data entry form and converted it into a custom control as discussed on Day 11. If not, you need to modify the code to call the data entry form instead of displaying the control. |
|
|
|
|
|
|
|
|
|
Using the System Tray control |
|
|
|
|
|
|
|
|
These days, you want to have many applications running for easy access yet don't want them displayed all the time. Many of these applications do this by using the Windows system tray functionality. The system tray is the frame on the far right of the Windows taskbar (see Figure 15.3). The icons displayed in the tray are used to interact with their associated applications. |
|
|
|
|
|
|
|
|
Figure 15.3.
The system tray has many application icons displayed for easy access. |
|
|
|
|
|
|
|
|
Microsoft provides the system tray control so you can provide this same functionality to users of your application. To see how to use this control in an application, add it to your Address Book project. A project such as the Address Book is a good example to use because many users need quick access to the names and phone numbers in the book but don't need it to be displayed all the time. |
|
|
|
|
|
|
|
|
The SysTray control contains only three properties and four events that you'll use to perform any action required (see Table 15.8). |
|
|
|
|
|